<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     pagizer
 * @subpackage  medias
 */

class m_medias_actions_block_MceObjectFoldersAction extends m_backoffice_extends_Action
{
	public function execute()
	{
		$rootNode = m_backoffice_services_RootNodeService::getInstance()->getModuleRootNode($this->getBlockParameter("rootFolder"));
			
		$this->addToModel("rootNode", $rootNode);
		$this->addToModel("folders", m_backoffice_services_FolderService::getInstance()
                                     ->getMenuItems($rootNode->getUniqueId(), "modules_backoffice/folder", $rootNode->getLang(), array("type" => "link")));
		
		$this->setView('success');
	}	
}